package com.generic.action;

import java.util.Map;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;

import com.generic.util.Constant;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class SignOff extends ActionSupport {
	
	private static final long serialVersionUID = -1913197892581297701L;
	
	@Action(value = "/sign-off", results = {
			@Result(name = "success", type="redirectAction", params={"actionName","home"}) })
	public String execute() throws Exception {
		Map<String, Object> session = ActionContext.getContext().getSession();
		session.remove(Constant.SESSION_MEMBER);
		
		return SUCCESS;
	}
}
